//package com.gba.mark.exam.controller;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.gba.mark.exam.entity.ExamPaper;
//import com.gba.mark.exam.service.ExamPaperService;
//import com.qigetech.utils.resultbundle.ResultBundle;
//import com.qigetech.utils.resultbundle.ResultBundleBuilder;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//import java.util.Map;
//
//@RestController
//@RequestMapping ("/exam/paper")
//public class ExamPaperController {
//
//    @Autowired
//    private ExamPaperService examPaperService;
//
//    @Autowired
//    private ResultBundleBuilder resultBundleBuilder;
//
//    /*
//    新建一份试卷
//     */
//    @PostMapping
//    public ResultBundle<Boolean> add (@RequestBody ExamPaper examPaper){
//        return resultBundleBuilder.bundle("",() -> examPaperService.save(examPaper));
//    }
//
//    /*
//   更新一份试卷
//     */
//
//    @PutMapping("/{id}")
//    public  ResultBundle<Boolean> update(@RequestBody ExamPaper examPaper,@PathVariable int id){
//        examPaper.setId(id);
//        return resultBundleBuilder.bundle("",() -> examPaperService.updateById(examPaper));
//    }
//
//    /*
//    删除一份试卷
//     */
//    @DeleteMapping("/{id}")
//    public ResultBundle<Boolean> delete(@PathVariable("id") int id) {
//        return resultBundleBuilder.bundle("", () -> examPaperService.removeById(id));
//    }
//
//    @GetMapping("/{id}")
//    public ResultBundle<ExamPaper> queryById(@PathVariable("id") int id) {
//        return resultBundleBuilder.bundle("", () -> examPaperService.getById(id));
//    }
//
//    @GetMapping("/list")
//    public ResultBundle<IPage<ExamPaper>> list(@RequestParam(name = "pageNum", defaultValue = "0") int pageNum,
//                                          @RequestParam(name = "pageSize", defaultValue = "20") int pageSize) {// 1 10
//        return resultBundleBuilder.bundle("", () ->
//                examPaperService.page(new Page<>(pageNum, pageSize)));
//    }
//
//    /*
//    查询用户的试卷
//     */
//    @GetMapping("/{id}/question/group_id/question_ids")
//    public  ResultBundle<List<Map<String,Object>>> selectedPaper (@PathVariable int id){
//        return resultBundleBuilder.bundle("",() -> examPaperService.
//    }
//
//
//}
